<?php

$querySql = "select * from admin_page as ap where ap.id in (select page_id from admin_page_user as apu where apu.user_name='".$_SESSION['suser']."')";

require_once '../data/connect.class.php';

$connect = new Connect("localhost","root","","email");

$resultSet = $connect->execute($querySql);
//$arr = $connect->getRow();
//foreach($arr as $key=>$resu) {
//}

foreach($resultSet as $res) {
	echo '<div class="main_nav_tab" onclick="openPage(\''.$res['id'].'\')" >';
	echo $res['name'];
	echo '</div>';
}
?>
